import java.io.*;

class AgentObjectInputStream 
	extends ObjectInputStream
{
	AgentObjectInputStream(ClassLoader loader,InputStream stream)
	   	throws StreamCorruptedException, IOException
   	{
		super(stream);
		this.loader=loader;
	}

	protected Class resolveClass(ObjectStreamClass v)
	   	throws IOException, ClassNotFoundException
	{
		System.out.println("resolve Class "+v.getName());
		return loader.loadClass(v.getName());
	}

	private ClassLoader loader;
}
